<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />

        <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
        Remove this if you use the .htaccess -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

        <title>web12</title>
        <meta name="description" content="" />
        <meta name="author" content="Choongang31" />

        <meta name="viewport" content="width=device-width; initial-scale=1.0" />

        <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
        <link rel="shortcut icon" href="/favicon.ico" />
        <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
        <script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
        <script>
            $(function(){
                //체크된 것을 선택하고 싶다 
               // .prop( propertyName )
               c=$(":checkbox").prop("checked");
               console.log("prop( checked )",c);   
               $("body").append("<p>"+c+"</p>");       
               c1=$(":checkbox:eq(1)").prop("checked");  
               $("body").append("<p>"+c1+"</p>"); 
               a=$(":checkbox:eq(1)").attr("checked");
               p=$(":checkbox:eq(1)").prop("checked");
               i=$(":checkbox:eq(1)").is(":checked");
               console.log("a=",a);
               console.log("p=",p);
               console.log("i=",i);
               
               //.removeProp(propertyName)
               $(":checkbox:eq(1)").removeProp("checked");
               
               //callbacks.add( callbacks )
               var a=function(x,y){
                   alert(x+y+"a실행 ");
               };
               //체크박스를 클릭하면 a 가 실행 a=function()
               $(":checkbox").click(a);
               var b=function(x,y){
                   alert("b실행:"+ x +","+y+$(this));
               };
               $("li").click(b);
               var callbacks = $.Callbacks();
               console.log("callbacks",callbacks);
               console.log("callbacks.add",callbacks.add);
               callbacks.add=b;
               console.log("callbacks.add",callbacks.add);
               callbacks.fire("xx","yy");
            
            });
        </script>
        
    </head>

    <body>
        <ol>
            <li>첫번째 li</li>
            <li>두번째 li</li>
        </ol>
        <input type="checkbox" name="hobby" value="soccer">축구 
        <input type="checkbox" name="hobby" value="internet" checked="checked">인터넷 하기 
        
        
    </body>
</html>
